import request from '@/utils/request'

// 新增类目
export function addCategory(data = {}) {
  return request.post('/dict/category/add', data)
}

// 类目详情
export function getCategoryDetail(data = {}) {
  return request.post('/dict/category/detail', data)
}

// 编辑类目
export function editCategory(data = {}) {
  return request.post('/dict/category/edit', data)
}

// 根据行业CODE获取类目树
export function getCategoryTree(data = {}) {
  return request.post('/dict/category/getTree', data)
}

// 类目列表
export function getCategoryList(data = {}) {
  return request.post('/dict/category/list', data)
}

// 获取行业列表
export function getIndustryList(data = {}) {
  return request.post('/dict/industry/list', data)
}

// 获取前台类目列表
export function getFrontCategoryList(data = {}) {
  return request.post('/frontCategory/list', data)
}

// 创建前台类目
export function creatFrontCategoryList(data = {}) {
  return request.post('/frontCategory/create', data)
}

// 更新前台类目
export function updateFrontCategoryList(data = {}) {
  return request.post('/frontCategory/update', data)
}

// 创建前台类目
export function deleteFrontCategory(data = {}) {
  return request.post(`/frontCategory/delete/${data.id}`, data)
}
